<template>
  <div class="desc">
    <!-- <h3>商品详情组件</h3> -->
    <h3>{{goodsdesc.title}}</h3>
    <hr>
    <div v-html="goodsdesc.content" class="content"></div>
  </div>
</template>

<script>
import axios from 'axios'
export default {
  data(){
    return{
      id:this.$route.params.id,
      goodsdesc:{}
    }
  },
  created(){
    this.getdesc()
  },
  methods:{
    getdesc(){
      axios.get("api/goods/getdesc/"+this.id).then(res=>{
        this.goodsdesc=res.data.message[0]
      })
    }
  }
}
</script>

<style lang="less" scoped>
  .desc{
    h3{
      font-size: 16px;
      font-weight: 700;
      color: #22a6ff;
      margin: 15px auto;
      text-align: center;
    }
    .content{
      padding: 10px;
      font-size: 14px;
    }
  }
</style>